package com.example.demo.repository;

import com.example.demo.model.WxUser;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WxUserRepository extends CrudRepository<WxUser, Long> {
    @Query(value = "select * from t_user where openID = %?1%", nativeQuery = true)
    List<WxUser> findByOpenID(String openID);
}
